package com.hjj.springboot.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

@TableName("t_notice")
@Data
public class Notice {

    @ExcelProperty("公告编号")
    @ColumnWidth(20)
    private Integer id;

    @ExcelProperty("公告内容")
    @ColumnWidth(60)
    private String content;

    @ExcelProperty("发布管理员编号")
    @ColumnWidth(20)
    private Integer uid;

    @ExcelProperty("发布时间")
    @ColumnWidth(20)
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    private Date upTime;

    @ExcelIgnore
    private boolean isPublic=false;

    @ExcelIgnore
    @TableField(select = false,exist = false)
    private Admin admin;
}
